from pydantic import BaseModel
from typing import List, Optional

from services.new_services.schemas.classes import BlockType


class Block(BaseModel):
    sms_count: int = 4
    cviya: str = 'ЦВИЯ.Сервисная'
    block_type: str = BlockType.FSC
    sms_index: List[Optional[int]] = [0, 1, 2, 3]
    rms_enabled: List[Optional[bool]] = [None, None]
    optics_connection: List[Optional[bool]] = [True, True]
    radio_connection: List[Optional[bool]] = [False, False]
    sms_freq: List[Optional[int]] = [1800, 1800, None, None]
    sms_enabled: List[Optional[bool]] = [False, False, None, None]
    sms_editable: List[Optional[bool]] = [False, False, True, True]


BLOCKS: List[Block] = [
    Block(block_type=BlockType.FSR, cviya='ЦВИЯ.464117.003-02', sms_count=2, rms_enabled=[None, None], sms_enabled=[False, False, None, None], sms_editable=[False, False, True, True], sms_freq=[1800, 1800, None, None], radio_connection=[False, False], optics_connection=[True, True]),
    Block(block_type=BlockType.FSR, cviya='ЦВИЯ.464117.003-02 ОС', sms_count=4, rms_enabled=[None, None], sms_enabled=[False, False, False, False], sms_editable=[False, False, False, False], sms_freq=[1800, 1800, 1800, 1800], radio_connection=[False, False], optics_connection=[True, True]),
    Block(block_type=BlockType.FSR, cviya='ЦВИЯ.464117.003-03', sms_count=2, rms_enabled=[False, None], sms_enabled=[False, False, None, None], sms_editable=[False, False, True, True], sms_freq=[1800, 1800, None, None], radio_connection=[True, False], optics_connection=[True, True]),
    Block(block_type=BlockType.FSR, cviya='ЦВИЯ.464117.003-03 РБ', sms_count=2, rms_enabled=[False, None], sms_enabled=[False, False, None, None], sms_editable=[False, False, True, True], sms_freq=[1800, 1800, None, None], radio_connection=[True, False], optics_connection=[True, True]),
    Block(block_type=BlockType.FSR, cviya='ЦВИЯ.464117.003-04', sms_count=2, rms_enabled=[False, False], sms_enabled=[False, False, None, None], sms_editable=[False, False, True, True], sms_freq=[1800, 1800, None, None], radio_connection=[True, True], optics_connection=[True, True]),
    Block(block_type=BlockType.FSR, cviya='ЦВИЯ.464117.003-05', sms_count=2, rms_enabled=[False, None], sms_enabled=[False, False, None, None], sms_editable=[False, False, True, True], sms_freq=[1800, 1800, None, None], radio_connection=[True, False], optics_connection=[True, True]),
    Block(block_type=BlockType.FSR, cviya='ЦВИЯ.464117.003-06', sms_count=2, rms_enabled=[None, None], sms_enabled=[False, False, None, None], sms_editable=[False, False, True, True], sms_freq=[2100, 2100, None, None], radio_connection=[False, False], optics_connection=[True, True]),
    Block(block_type=BlockType.FSR, cviya='ЦВИЯ.464117.003-07', sms_count=2, rms_enabled=[False, None], sms_enabled=[False, False, None, None], sms_editable=[False, False, True, True], sms_freq=[1800, 1800, None, None], radio_connection=[True, False], optics_connection=[True, True]),
    Block(block_type=BlockType.FSR, cviya='ЦВИЯ.464117.003-08', sms_count=2, rms_enabled=[None, None], sms_enabled=[False, False, None, None], sms_editable=[False, False, True, True], sms_freq=[1800, 1800, None, None], radio_connection=[False, False], optics_connection=[True, True]),

    Block(block_type=BlockType.FSC, cviya='ЦВИЯ.Сервисная', sms_count=4, rms_enabled=[False, False], sms_enabled=[False, False, False, False], sms_editable=[False, False, False, False], sms_freq=[1800, 1800, 1800, 1800], radio_connection=[True, True], optics_connection=[True, True], sms_index=[0, 1, 3, 2]),
    Block(block_type=BlockType.FSC, cviya='ЦВИЯ.464117.004-02', sms_count=2, rms_enabled=[False, None], sms_enabled=[False, None, None, False], sms_editable=[False, False, False, False], sms_freq=[1800, None, None, 1800], radio_connection=[True, False], optics_connection=[True, True], sms_index=[0, 3, 2, 1]),
    Block(block_type=BlockType.FSC, cviya='ЦВИЯ.464117.004-02 РБ', sms_count=2, rms_enabled=[False, None], sms_enabled=[False, None, None, False], sms_editable=[False, False, False, False], sms_freq=[1800, None, None, 1800], radio_connection=[True, False], optics_connection=[True, True], sms_index=[0, 3, 2, 1]),
    Block(block_type=BlockType.FSC, cviya='ЦВИЯ.464117.004-03', sms_count=3, rms_enabled=[False, None], sms_enabled=[False, False, None, False], sms_editable=[False, False, False, False], sms_freq=[1800, 1800, None, 900], radio_connection=[True, False], optics_connection=[True, True], sms_index=[0, 1, 3, 2]),
    Block(block_type=BlockType.FSC, cviya='ЦВИЯ.464117.004-04', sms_count=2, rms_enabled=[None, None], sms_enabled=[False, None, None, False], sms_editable=[False, False, False, False], sms_freq=[1800, None, None, 1800], radio_connection=[False, False], optics_connection=[True, True], sms_index=[0, 3, 2, 1]),
    Block(block_type=BlockType.FSC, cviya='ЦВИЯ.464117.004-05', sms_count=3, rms_enabled=[None, None], sms_enabled=[False, False, None, False], sms_editable=[False, False, False, False], sms_freq=[1800, 1800, None, 900], radio_connection=[False, False], optics_connection=[True, True], sms_index=[0, 1, 3, 2]),
    Block(block_type=BlockType.FSC, cviya='ЦВИЯ.464117.004-06', sms_count=2, rms_enabled=[False, False], sms_enabled=[False, None, None, False], sms_editable=[False, False, False, False], sms_freq=[1800, None, None, 1800], radio_connection=[True, True], optics_connection=[True, True], sms_index=[0, 3, 2, 1]),
    Block(block_type=BlockType.FSC, cviya='ЦВИЯ.464117.004-07', sms_count=3, rms_enabled=[False, False], sms_enabled=[False, False, None, False], sms_editable=[False, False, False, False], sms_freq=[1800, 1800, None, 900], radio_connection=[True, True], optics_connection=[True, True], sms_index=[0, 1, 3, 2]),
    Block(block_type=BlockType.FSC, cviya='ЦВИЯ.464117.004-08', sms_count=3, rms_enabled=[None, None], sms_enabled=[False, False, None, False], sms_editable=[False, False, False, False], sms_freq=[1800, 1800, None, 1800], radio_connection=[False, False], optics_connection=[True, True], sms_index=[0, 1, 3, 2]),
    Block(block_type=BlockType.FSC, cviya='ЦВИЯ.464117.004-08 ОС', sms_count=4, rms_enabled=[None, None], sms_enabled=[False, False, False, False], sms_editable=[False, False, False, False], sms_freq=[1800, 1800, 1800, 1800], radio_connection=[False, False], optics_connection=[True, True], sms_index=[0, 1, 3, 2]),
    Block(block_type=BlockType.FSC, cviya='ЦВИЯ.464117.004-09', sms_count=3, rms_enabled=[False, None], sms_enabled=[False, False, None, False], sms_editable=[False, False, False, False], sms_freq=[1800, 1800, None, 1800], radio_connection=[True, False], optics_connection=[True, True], sms_index=[0, 1, 3, 2]),
    Block(block_type=BlockType.FSC, cviya='ЦВИЯ.464117.004-10', sms_count=3, rms_enabled=[False, False], sms_enabled=[False, False, None, False], sms_editable=[False, False, False, False], sms_freq=[1800, 1800, None, 1800], radio_connection=[True, True], optics_connection=[True, True], sms_index=[0, 1, 3, 2]),
    Block(block_type=BlockType.FSC, cviya='ЦВИЯ.464117.004-11', sms_count=4, rms_enabled=[None, None], sms_enabled=[False, False, False, False], sms_editable=[False, False, False, False], sms_freq=[2100, 2100, 900, 900], radio_connection=[False, False], optics_connection=[True, True], sms_index=[0, 1, 3, 2]),
    Block(block_type=BlockType.FSC, cviya='ЦВИЯ.464117.004-12', sms_count=3, rms_enabled=[False, None], sms_enabled=[False, False, None, False], sms_editable=[False, False, False, False], sms_freq=[1800, 1800, None, 900], radio_connection=[True, False], optics_connection=[True, True], sms_index=[0, 1, 3, 2]),
    Block(block_type=BlockType.FSC, cviya='ЦВИЯ.464117.004-13', sms_count=3, rms_enabled=[None, None], sms_enabled=[False, False, None, False], sms_editable=[False, False, False, False], sms_freq=[1800, 1800, None, 900], radio_connection=[False, False], optics_connection=[True, True], sms_index=[0, 1, 3, 2]),
]
